package com.x.linx.fenfencard.model.meta;

public class Location {
	// + for test
	public static final double TEST_RADIUS = 65.65607;
	public static final double TEST_LONGITUDE = 114.048396;
	public static final double TEST_LATITUDE = 22.625223;
	
	public static Location newTestLocation(){
		return new Location(TEST_RADIUS, TEST_LONGITUDE, TEST_LATITUDE);
	}
	// - for test
	
	private static final String PARAM_NAME_RADIUS = "radius";
	private static final String PARAM_NAME_LONGITUDE = "longitude";
	private static final String PARAM_NAME_LATITUDE = "latitude";
	
	private double radius;
	private double longitude;
	private double latitude;
	
	public Location(double radius, double longitude, double latitude){
		this.radius = radius;
		this.longitude = longitude;
		this.latitude = latitude;
	}
	
	public String toGetParam(){
		String retString = PARAM_NAME_RADIUS + "=" + radius + "&"
				+ PARAM_NAME_LONGITUDE + "=" + longitude + "&"
				+ PARAM_NAME_LATITUDE + "=" + latitude;
		return retString;
	}

	// setter and getter
	public double getRadius() {
		return radius;
	}

	public void setRadius(double radius) {
		this.radius = radius;
	}

	public double getLongitude() {
		return longitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public double getLatitude() {
		return latitude;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

}
